Function.prototype._apply = function () {
  let [thisArg, rest] = [...arguments]
  thisArg.fn = this
  let res = thisArg.fn(...rest)
  delete thisArg.fn
  return res
}

var foo = {
  name: 'Yeoman'
}

var name = 'Chris'

function bar (job, age) {
  console.log(this.name)
  console.log(job, age)
}

bar._apply(foo, ['programmer', 21])
